@echo off

::nuitka --standalone --enable-plugin=pyside6 .\maingui.py
set "folderpath=.\maingui.dist\scrcpy"
if not exist "%folderpath%" (
    mkdir "%folderpath%"
    echo Folder created: %folderpath%
) else (
    echo Folder already exists: %folderpath%
)

echo "copy file 'scrcpy\scrcpy-server.jar' to %folderpath%"
echo f| xcopy "scrcpy\scrcpy-server.jar" "%folderpath%\scrcpy-server.jar" /Y

echo "rename: maingui.exe -> launch.exe"
move maingui.dist\maingui.exe maingui.dist\launch.exe
